// pages/group/groupDetail/detail.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    title: '',
    img: '',
    list: [],
    cardList: []
  },
  onBack() {
    wx.navigateBack({
        url: 1,
    });
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
      this.setData({
          title:options.title,
          img: options.img
      })
    this.getDetail(options.id)
  },
  getDetail(id) {
    // wx.request({
    //     url: '', 
    //     method: 'GET', 
    //     data: {
    //       id: id
    //     },
    //     success(res) {
    //       if (res.statusCode === 200) {
    //         console.log('获取成功', res.data);
    //       } else {
    //         console.log('获取失败，状态码:', res.statusCode);
    //       }
    //     },
    //     fail(error) {
    //       console.error('请求失败', error);
    //     }
    // });
    const detailList = [
        [
            {
                name: '总计念诵',
                num: 2542512,
            },
            {
                name: '总计人数',
                num: 4582, 
            },
            {
                name: '今日念诵',
                num: 652512,
            }
        ],
        [
            {
                name: '一片绿叶',
                date: '2025-03-14',
                datelyRecitations: 2,
                weeklyRecitations: 8,
                monthlyRecitations: 25,
                totallyRecitations: 852,
                image: 'https://img.js.design/assets/img/65f34d2cbc9d305d0ac665f7.png#5a5ecb983bcf57372a4537d035b2f922'
            },
            {
                name: '泥丸欧帝尔',
                date: '2025-03-14',
                datelyRecitations: 2,
                weeklyRecitations: 8,
                monthlyRecitations: 25,
                totallyRecitations: 852,
                image: 'https://img.js.design/assets/img/6597a30f662b2001110aad0e.png#a8ddedd08f109c80bd9e3bc3fa2f2764'
            },
            {
                name: '杜伟',
                date: '2025-03-14',
                datelyRecitations: 2,
                weeklyRecitations: 8,
                monthlyRecitations: 25,
                totallyRecitations: 852,
                image: 'https://img.js.design/assets/img/673c36e8de61f2f62ef0a02e.png#5612989536c43b9deb58919c27dcf80d'
            },
            {
                name: '吴宇恒',
                date: '2025-03-14',
                datelyRecitations: 2,
                weeklyRecitations: 8,
                monthlyRecitations: 25,
                totallyRecitations: 852,
                image: 'https://img.js.design/assets/img/673c36e0de61f2f62ef09d52.png#04ded11fd49617f5bbf2d821c6720958'
            },
            {
                name: '天山共话',
                date: '2025-03-14',
                datelyRecitations: 2,
                weeklyRecitations: 8,
                monthlyRecitations: 25,
                totallyRecitations: 852,
                image: 'https://img.js.design/assets/img/668f9a8e15275e6eaea08d27.png#b879a5b5fc02d1bbbfa7f94ada4fc9dc'
            },
            {
                name: '吴宇恒',
                date: '2025-03-14',
                datelyRecitations: 2,
                weeklyRecitations: 8,
                monthlyRecitations: 25,
                totallyRecitations: 852,
                image: 'https://img.js.design/assets/img/673c36e0de61f2f62ef09d52.png#04ded11fd49617f5bbf2d821c6720958'
            },
        ]
    ]
    this.setData({
        cardList: detailList[0],
        list: detailList[1],
    })
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})